{%extends "message_base.html"%}
{%block body%}
<script language="JavaScript" type="text/javascript"><!--
  document.onkeydown = M_dashboardKeyDown;	
-->
</script>
<h2>{%block subtitle%}Issues{%endblock%}</h2>

<form action="{%if show = 'NAA' %}{%url mlmgr.views.accept_predictions %}{%else%}{%url mlmgr.views.update_types %}{%endif%}" method="post">

<div class="issue-list">
  <div class="pagination">{%if user%}<span align="left">
      {%if show != 'NAA' %}<select name="type">{% for key,value in types.items %}{<option value="{{ key }}">{{ value }}</option>{%endfor%}</select>{%endif%}
    <input type="submit" value="Submit" /></span>{%endif%}
    {%if newest%}
      <a class="novisit" href="{{newest}}">&laquo; Newest</a>
    {%endif%}
    {%if prev%}
      <a class="novisit" href="{{prev}}">&lsaquo; Newer</a>
    {%endif%}
    <b>{{first}}{%if last%} - {{last}}{%endif%}</b>
    {%if next%}<a class="novisit" href="{{next}}">{{nexttext}} &rsaquo;</a>
    {%else%}<span style="color:gray">{{nexttext}} &rsaquo;</span>{%endif%}
  </div>
  
  <table id="queues">
    {%if not messages%}
      <tr><td colspan="9"><span class="disabled">(None)</span></td></tr>
    {%else%}
      {%include "message_heading.html"%}
      {%for message in messages%}
        {%include "message_row.html"%}
      {%endfor%}
    {%endif%}
  </table>

  <div class="pagination">
    {%if newest%}
      <a class="novisit" href="{{newest}}">&laquo; Newest</a>
    {%endif%}
    {%if prev%}
      <a class="novisit" href="{{prev}}">&lsaquo; Newer</a>
    {%endif%}
    <b>{{first}}{%if last%} - {{last}}{%endif%}</b>
    {%if next%}<a class="novisit" href="{{next}}">{{nexttext}} &rsaquo;</a>
    {%else%}<span style="color:gray">{{nexttext}} &rsaquo;</span>{%endif%}
  </div>

</div>

    {% csrf_token %}

</form>

<script language="JavaScript" type="text/javascript"><!--
var dashboardState = new M_DashboardState(window,'issue');
-->
</script>
{%endblock%}
